<template>
  <div class="updatethesystem">
    <div class="updatethesystem__container">
      <div class="updatethesystem__container__content">
        <el-row>
          <el-col :span="12" :md="12" :sm="24" :xs="24">
            <div class="upleft">
              <div class="updatethesystem__container__content__title">
                Crypto moves money forward.
              </div>
            </div>
          </el-col>
          <el-col :span="12" :md="12" :sm="24" :xs="24">
            <div class="upright">
              <div class="upright__words">
                Stablecoins make it possible for currencies like the US dollar to exist in digital form. They do
                everything
                a copper penny can’t — they travel the globe in seconds and can be spent in over 190 countries.
              </div>
              <div class="upright__btn">
                Learn more
              </div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="imgcard" v-if="flag" @click="flag = !flag">
              <el-icon size="120px" class="play">
                <VideoPlay />
              </el-icon>
              <img
                src="https://images.ctfassets.net/c5bd0wqjc7v0/3KeO57jekv6Qa3OwBynKWY/efdd087ff241ab3d75b7de3e09dc3056/Social_Thumbnail_16x9.jpg"
                alt="">
            </div>

            <div class="iframe-container" v-else>
              <iframe src="https://fast.wistia.net/embed/iframe/w80slmsl1p?autoplay=1&amp;modestbranding=1"
                frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="" scrolling="no"
                title="Player Frame"></iframe>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      flag: true,
    }
  },
}
</script>

<style lang="scss" scoped>
.updatethesystem__container {
  width: 100%;
  background-color: #0A0B0D;
  color: #fff;

  .updatethesystem__container__content {
    max-width: 1220px;
    margin: 0 auto;
    padding-top: 88px;

    .upleft {
      box-sizing: border-box;
      padding: 40px 0px;
      height: 320px;
      font-size: 64px;
    }

    .upright {
      height: 320px;
      font-size: 26px;
      position: relative;

      .upright__words {}

      .upright__btn {
        font-size: 16px;
        position: absolute;
        left: 0;
        bottom: 30px;
        width: 154px;
        height: 56px;
        background: #0052FF;
        line-height: 56px;
        border-radius: 56px;
        text-align: center;
      }
    }
  }

  .imgcard {
    cursor: pointer;
    margin: 0 auto;
    max-width: 1220px;
    overflow: hidden;
    position: relative;

    .play {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      z-index: 999999;
    }

    img {
      transition: ease-in-out 2s;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }


    &:hover img {
      transform: scale(1.1);
      /* 悬停时放大1.2倍 */
    }
  }
}


.iframe-container {
  width: 100%;
  height: 600px;
  /* 或者其他你期望的高度 */
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
}




@media screen and (max-width: 768px) {

  .updatethesystem__container {
    width: 100%;
    background-color: #0A0B0D;
    color: #fff;

    .updatethesystem__container__content {
      max-width: 1220px;
      margin: 0 auto;
      padding: 20px 20px;

      .upleft {
        box-sizing: border-box;
        padding: 60px 0px;
        height: auto;
        font-size: 34px;
      }

      .upright {
        height: 230px;
        font-size: 16px;
        position: relative;

        .upright__words {}

        .upright__btn {
          font-size: 16px;
          position: absolute;
          left: 0;
          bottom: 30px;
          width: 100%;
          height: 56px;
          background: #0052FF;
          line-height: 56px;
          border-radius: 56px;
          text-align: center;
        }
      }
    }

    .imgcard {
      cursor: pointer;
      margin: 0 auto;
      max-width: 1220px;
      overflow: hidden;
      position: relative;

      .play {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 999999;
      }

      img {
        transition: ease-in-out 2s;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }


      &:hover img {
        transform: scale(1.1);
        /* 悬停时放大1.2倍 */
      }
    }
  }

}
</style>